import unittest
from page.home_page_lcy import Home_Page


class MessageTestCase(unittest.TestCase):
    @classmethod
    def setUpClass(cls) -> None:
        cls.home = Home_Page(appPackage='com.nearme.gamecenter', appActivity='.ui.activity.SplashActivity')

    def test_01_message(self):
        self.home.message_click()
        self.home.message_game_click()
        self.home.message_notice_click()
        self.home.message_interact_click()
        self.home.clear_button_click()
        toast = self.home.get_toast_text()
        self.assertEqual(toast, '没有可清除的未读消息', msg="断言获取的toast值")

    @classmethod
    def tearDownClass(cls) -> None:
        cls.home.quit()

if __name__ == '__main__':
    unittest.main(verbosity=2)
